<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="zh-CN"><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta name="format-detection" content="telephone=no">
<title>我的预订</title>
<link rel="stylesheet" type="text/css" href="wx_assets/css/product.css?v=2013-11-29">
<script type='text/javascript' src='wx_assets/js/jquery-1.7.1.min.js'></script>
<script type='text/javascript' src='wx_assets/js/base.js'></script>
<script src="http://res.wx.qq.com/mmbizwap/en_US/htmledition/js/wxm-core1530d0.js"></script>

</head>
<body id="page_intelOrder" class="myOrderCon">
<div class="center">
    <ul class="round">
    	<li class="title mb">
            <span class="none">我的预订</span>
        </li>
        
        <li>
       		<div class="text">
       			<p >联&nbsp;系&nbsp;人 ： {$fullName}</p>
        	</div>
        </li>
        <li>
       		<div class="text">
       			<p >预订时间 ： {$reserveTime}</p>
       		</div>
        </li>
       	<li>
       		<div class="text">
       			<p >店&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;名 ： {$sName}</p>
       		</div>
        </li>
       	<li>
       		<div class="text">
	       		<p >地&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;址 ： {$sAddress}</p>
       		</div>
        </li>
       	<li>
       		<div class="text">
	       		<p >联系电话： {$sPhone}</p>
       		</div>
        </li>
       	<li>
       		<div class="text">
       			<p >预订人数 ： {$personCount}</p>
       		</div>
        </li>
       	<li>
       		<div class="text">
       			<p >桌位/包间： {$resName}</p>
       		</div>
        </li>
       	<li>
       	<div class="text">
       		<p >单&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;号 ： {$serialNumber}</p>
        </div>
        </li>
        <li>
       		<div class="text">
       			<p >下单时间 ： {$createTime}</p>
       		</div>
        </li>
       	
        <notempty name="remark">
       	<li>
       		<div class="text">
       			<p >备注说明 ： {$remark}</p>
       		</div>
        </li>
        </notempty>
    </ul>
		
		
    <!--<footer class="footFix">
        <a onclick="shareMenu()">分享给好友</a>
    </footer> -->
</div>

<script>
document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
	WeixinJSBridge.call('showOptionMenu');
	});
	
		function report(link, fakeid, action_type){
		    var parse_link = parseUrl(link);
		    if(parse_link == null)
		    {
		      return ;
		    }
		    var query_obj = parseParams( parse_link['query_str'] );
		    query_obj['action_type'] = action_type;
		    query_obj['uin'] = fakeid;
		    var report_url = '/mp/appmsg/show?' + jQuery.param( query_obj );
		    jQuery.ajax({
		      url: report_url,
		      type: 'POST',
		      timeout: 2000
		    })
		 };
		 
		function share_scene(link, scene_type) {
			// Android无法会截取encode的参数，所以改用直接添加参数的方式
			var share_url = link + '&scene=' + scene_type;
			return share_url;
		};

		(function() {
			var desString ='{$resName}'+ "\n点击查看预订详情";
			var titleString = "我在"+'{$sName}'+"预订了一个桌位";
			
		//	var search = resetHerf(window.location.search);
			var search = window.location.search;

			var onBridgeReady = function() {
			var link = window.location.protocol + "//"
						+ window.location.host + window.location.pathname + search;
		
				link = link.replace("{", "%7B");
				link = link.replace("}", "%7D");
				var appId = '', title = htmlDecode(titleString), desc = htmlDecode(desString),
				imgUrl = encodeURI('{$sPicUrl}'), fakeid = "Mjc2OTgzMTM1", desc = desc || link;

				// 发送给好友; 
				WeixinJSBridge.on('menu:share:appmessage', function(argv) {

					WeixinJSBridge.invoke('sendAppMessage', {
						"appid" : appId,
						"img_url" : imgUrl,
						"img_width" : "640",
						"img_height" : "640",
						"link" : share_scene(link, 1),
						"desc" : desc,
						"title" : title
					}, function(res) {
						report(link, fakeid, 1);
					});
				});
				// 分享到朋友圈;
				WeixinJSBridge.on('menu:share:timeline', function(argv) {
					report(link, fakeid, 2);
					WeixinJSBridge.invoke('shareTimeline', {
						"img_url" : imgUrl,
						"img_width" : "640",
						"img_height" : "640",
						"link" : share_scene(link, 2),
						"desc" : desc,
						"title" : title
					}, function(res) {
					});

				});

				// 分享到微博;
				var weiboContent = '';
				WeixinJSBridge.on('menu:share:weibo', function(argv) {

					WeixinJSBridge.invoke('shareWeibo', {
						"content" : title + share_scene(link, 3),
						"url" : share_scene(link, 3)
					}, function(res) {
						report(link, fakeid, 3);
					});
				});
				// 隐藏右上角的选项菜单入口;
				//WeixinJSBridge.call('hideOptionMenu');
			};
			if (document.addEventListener) {
				document.addEventListener('WeixinJSBridgeReady', onBridgeReady,
						false);
			} else if (document.attachEvent) {
				document.attachEvent('WeixinJSBridgeReady', onBridgeReady);
				document.attachEvent('onWeixinJSBridgeReady', onBridgeReady);
			}
		})();
	</script>

</body>
</html>